import { FC, Suspense, memo } from 'react';
import { Repeater } from '@/components/KeepAliveOutlet/Repeater';
import type { IProps } from '@/components/KeepAliveOutlet/type';

const Offscreen: FC<IProps> = (props) => {
	const { mode, children } = props;
	return (
		<Suspense fallback={null}>
			<Repeater mode={mode}>{children}</Repeater>
		</Suspense>
	);
};

export default memo(Offscreen);
